# Copyright 2010-2025 Google LLC
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

cc_library(
    name = "general_constraint_to_mip",
    srcs = ["general_constraint_to_mip.cc"],
    hdrs = ["general_constraint_to_mip.h"],
    visibility = ["//visibility:public"],
    deps = [
        ":linear_expr_util",
        "//ortools/math_opt/cpp:math_opt",
        "@com_google_absl//absl/status",
        "@com_google_absl//absl/strings:str_format",
    ],
)

cc_library(
    name = "linear_expr_util",
    srcs = ["linear_expr_util.cc"],
    hdrs = ["linear_expr_util.h"],
    visibility = ["//visibility:public"],
    deps = [
        "//ortools/math_opt/cpp:math_opt",
        "@com_google_absl//absl/algorithm:container",
    ],
)

cc_library(
    name = "solution_feasibility_checker",
    srcs = ["solution_feasibility_checker.cc"],
    hdrs = ["solution_feasibility_checker.h"],
    visibility = ["//visibility:public"],
    deps = [
        "//ortools/base:mathutil",
        "//ortools/base:status_macros",
        "//ortools/math_opt/cpp:math_opt",
        "//ortools/util:fp_roundtrip_conv",
        "@com_google_absl//absl/algorithm:container",
        "@com_google_absl//absl/status",
        "@com_google_absl//absl/status:statusor",
        "@com_google_absl//absl/strings",
        "@com_google_absl//absl/strings:str_format",
    ],
)

cc_library(
    name = "solution_improvement",
    srcs = ["solution_improvement.cc"],
    hdrs = ["solution_improvement.h"],
    visibility = ["//visibility:public"],
    deps = [
        "//ortools/base:status_macros",
        "//ortools/math_opt/core:math_opt_proto_utils",
        "//ortools/math_opt/cpp:math_opt",
        "//ortools/math_opt/validators:model_validator",
        "//ortools/util:fp_roundtrip_conv",
        "@com_google_absl//absl/log:check",
        "@com_google_absl//absl/status",
        "@com_google_absl//absl/status:statusor",
        "@com_google_absl//absl/types:span",
    ],
)

cc_library(
    name = "dualizer",
    srcs = [
        "dualizer.cc",
    ],
    hdrs = ["dualizer.h"],
    visibility = ["//visibility:public"],
    deps = [
        "//ortools/base:map_util",
        "//ortools/math_opt/cpp:math_opt",
        "@com_google_absl//absl/container:flat_hash_map",
        "@com_google_absl//absl/types:span",
    ],
    alwayslink = 1,
)
